<?php
if ((!($this->pageCount<=1))){ ?>
<div class="pager">
                    <div class="box">
                        <?php if($this->first != $this->current):?>
                            <a href="<?= $this->url(array('page' =>$this->current-1)); ?>" class="prev-l">предыдущая</a>
                        <?php else:?>
                            <span class="prev">предыдущая</span>
                        <?php endif;?>
                        <?php if($this->current != $this->last):?>
                        <a href="<?= $this->url(array('page' =>$this->current+1)); ?>" class="next-l">следующая</a>
                        <?php else:?>
                         <span class="next">следующая</span>
                        <?php endif;?>
                    </div>
                <ul>
                    <?php if($this->first == $this->current):?>
                        <li class="active"><a href="#"><?=$this->first?></a></li>
                    <? else :?>
                        <li><a href="<?= $this->url(array('page' =>$this->first)); ?>"><?= $this->first ?></a></li>
                    <?php endif; ?>
                    
                    <?php if ($this->current >=$this->first+3):?>
                        <li><a  href="<?= $this->url(array('page' =>$this->previous-1)); ?>">...</a></li>
                    <? endif; ?>
                    
                    <?php if (($this->current!=$this->first+1)&&($this->previous <> '')): ?>
                        <li><a href="<?= $this->url(array('page' =>$this->previous));?>"><?=$this->previous?></a></li>
                    <?php endif; ?>
                    
                    <?php  if($this->first != $this->current): ?>
                        <li class="active"><a href="#"><?=$this->current?></a></li>
                    <? endif;?>
                    <?php if ($this->current!=$this->last-1): ?>
                        <li><a href="<?= $this->url(array('page' =>$this->next)); ?>"><?=$this->next?></a></li>
                    <?php endif; ?>
                    
                    <?php if ($this->current <=$this->last-3):?>
                        <li><a href="<?= $this->url(array('page' =>$this->next+1)); ?>">...</a></li>
                    <?php endif;?>
                    
                    <?php if($this->last == $this->current):?>
                    <?php else :?>
                        <li><a href="<?= $this->url(array('page' =>$this->last)); ?>"><?= $this->last ?></a></li>
                    <?php endif; ?>
                </ul>
</div>
<?php }?>